package com.example.demo.secDemo;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@ComponentScan
public class ConfigurationMain {


    public static void main(String[] args) {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(ConfigurationDemo.class);
//        DemoClass bean = applicationContext.getBean(DemoClass.class);
//        bean.say();

        String[] names = applicationContext.getBeanDefinitionNames();
        for(int i=0;i<names.length;i++){
            System.out.println(names[i]);
        }

    }
}
